Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming
Overview of object-oriented programming
To understand the new features and how best to use them, it is helpful to understand the key concepts of object-oriented programming. This section is a brief introduction to object-oriented programming. It also compares these concepts with features of procedural programming used to accomplish the same goals, using the Progress 4GL.
Object-oriented programming is a programming model organized around objects rather than actions. Conventional procedural programming normally takes input data, processes it, and produces output data. The primary programming challenge is how to write the logic. Object-oriented programming focuses on the objects that you want to manipulate, their relationships, and the logic required to manipulate them.
The fundamental advantage of object-oriented programming is that the data and the operations that manipulate the data are both encapsulated in the object with a well-defined interface. Objects are the building blocks of an object-oriented program. An application that uses object-oriented technology is basically a collection of objects that interact through their interfaces.
The concepts of a class, type, and object are closely related but it is important to understand the difference between these three terms. A class provides a definition—data members and methods—and an implementation for the methods. A data member is a variable, buffer, temp-table, or similar data element that is defined for a class at the same level as its methods. A type defines the interface to the state and behavior of a class, regardless of how it is implemented. An object is an instance of a class. So, a class defines a set of objects that share a common structure and provide a common interface that specifies how other classes (sets of objects) can interact with it.
The object-oriented extensions to the Progress 4GL provide support for the object-oriented features described in the following sections:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |